using System;
using System.Collections.Generic;

using MvcCms.Data;
using System.Linq;

namespace MvcCmsProjectTracker.Data
{
    public interface ITicketRepository
    {
        void Save();

        Ticket CreateTicket(Ticket ticketToCreate);
        Ticket EditTicket(Ticket ticketToEdit);

        void AddTicket(Ticket ticket);
        void AddTicketAttachment(TicketAttachment attachment);
        void AddTicketComment(TicketComment comment);
        void AddTicketHistory(TicketHistory history);
        void AddTicketNotification(TicketNotification notification);

        void DeleteTicket(Ticket ticket);
        void DeleteTicketAttachment(TicketAttachment attachment);
        void DeleteTicketComment(TicketComment comment);
        void DeleteTicketHistory(TicketHistory history);
        void DeleteTicketNotification(TicketNotification notification);

        Ticket GetTicket(int ticketID);
        TicketAttachment GetTicketAttachment(int attachmentID);
        IQueryable<TicketAttachment> GetTicketAttachments(int ticketID);
        TicketComment GetTicketComment(int commentID);
        IQueryable<TicketComment> GetTicketComments(int ticketID);
        IQueryable<TicketHistory> GetTicketHistories(int ticketID);
        TicketHistory GetTicketHistory(int historyID);
        TicketNotification GetTicketNotification(int notificationID);
        IQueryable<TicketNotification> GetTicketNotifications(int ticketID);
        IQueryable<Ticket> GetTicketsByPriority(int projectID, int priorityID);
        IQueryable<Ticket> GetTicketsByProject(int projectID);
        IQueryable<Ticket> GetTicketsByStatus(int projectID, int statusID);
        IQueryable<Ticket> GetOpenHelpDeskTickets(int portalId);
        IQueryable<Ticket> GetMyTickets(Guid userId);
    }
}